from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager
from info import create_app,db


app=create_app('development')

#6.Flask-Script与数据库迁移扩展
# 创建manager对象

manager=Manager(app)
Migrate(app,db)
# 生成迁移命令db
manager.add_command('db',MigrateCommand)

@app.route('/')
def index():
    print('hello')
    return 'index'


if __name__ == '__main__':
    # 运行开发web服务器
    manager.run()
